#include <iostream>
#include <cstdlib>
#include <random>
#include <vector>
#include <chrono>
#include <iomanip>
#include "threebody.h"

int main (int argc, char *argv[]){
    typedef std::chrono::high_resolution_clock myclock;
    myclock::time_point beginning = myclock::now();
    int n = 6;//既包括横坐标也包括纵坐标
    {std::vector<double> arr(n);
    myclock::duration d = myclock::now() - beginning;
    unsigned seed = d.count();
    std::default_random_engine generator(seed);
    std::uniform_real_distribution<double> dist( 0.0, 1.0);
    for (std::vector<double>::iterator arr_iterator=arr.begin();
	 arr_iterator != arr.end();
	 ++arr_iterator)
	*arr_iterator=dist(generator);
    double a[n];
    for(int i=0;i<n;i++)
    a[i]=100*arr[i];}//加括号使arr自动析构
    ThreeBody test;
    test.set_x(*arr);
    test.set_y(&arr[3]);
    return 0;
}